package com.ldzy.utilts;
/**
 * @Description: 返回值封装工具类
 * @Author: 新写的旧代码
 * @CreateTime: 2022/4/11
 */
public class JsonResult<T>{

    private T data;
    private String code;
    private String msg;
    private String status;

    public JsonResult(T data) {
        this.data = data;
        this.code = "200";
        this.status = "success";
        this.msg = "success";
    }

    public JsonResult(T data, String code, String msg) {
        this.data = data;
        this.code = code;
        this.status = "fail";
        this.msg = msg;
    }

    public JsonResult(T data, String code, String msg, String status) {
        this.data = data;
        this.code = code;
        this.status = status;
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getStatus(){
        return status;
    }

    public void setStatus(String status){
        this.status = status;
    }

}